<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>simvoc.input.egee_map_input</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="simvoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SimVOC</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="simvoc-module.html">Package&nbsp;simvoc</a> ::
        <a href="simvoc.input-module.html">Package&nbsp;input</a> ::
        Module&nbsp;egee_map_input
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module egee_map_input</h1><p class="nomargin-top"><span class="codelink"><a href="simvoc.input.egee_map_input-pysrc.html">source&nbsp;code</a></span></p>
<p>Grid map input component for EGEE GRIF-LAL Information System data, 
  available from the Grid Observatory (grid-observatory.org). This input 
  component has the same limitations as the input data set: the exact size 
  of each CE on the grid should be regarded as an estimate at best. 
  Multiple CEs may share the same hardware, leading to overcounting of site
  sizes. Two heuristics have been added to the code to reduce the 
  overcount: a duplicate detection heuristic, and a merge heuristic. 
  Whenever two CEs in the same domain have the same size, the duplicate 
  detection heuristic generates a single cluster for both CEs. Whenever 
  several clusters (of differing sizes) are present on the same domain, 
  they are merged into the largest sized cluster among the several. 
  Although these heuristics should reduce overcount, it is possible that 
  they introduce undercount.</p>
  <p>When invoked as a script, this component has the following 
  signature:</p>
  <p>egee_map_input.py -o &lt;output_file&gt; [-c &lt;comment&gt;] 
  &lt;lis_file&gt; [... &lt;lis_file&gt;]</p>
  <p>where &lt;lis_file&gt; is a base GRIF-LAL file obtained from the Grid 
  Observatory, &lt;output_file&gt; specifies where the output is to be 
  written, with an optional &lt;comment&gt; added to the metadata of the 
  output file. Multiple GRIF-LAL files may be used as input, but input 
  files MUST be in time order. All files MUST have names of the format 
  GRIF-LAL:YYYYMMDD-HHhMM:bdii.lis</p>
  <p>It should be noted that this component CANNOT handle the .diff files 
  included with the Grid Observatory traces. These files must be applied 
  externally, if desired, using the patch(1) command.</p>
  <p>The output produced by this module will be a text file produced by the
  map_format_writer module. If multiple input files are specified, then the
  grid file will represent a dynamic grid that changes over time (provided 
  the grid maps actually change in the input files).</p>

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="simvoc.input.egee_map_input.EGEEMap-class.html" class="summary-name">EGEEMap</a><br />
      Temporary data structure for processing EGEE map information.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="simvoc.input.egee_map_input.SiteParser-class.html" class="summary-name">SiteParser</a><br />
      Extension to the modified LDIF parser for extracting GRIF-LAL 
        Information System information (.lis files).
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">str</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.input.egee_map_input-module.html#domain" class="summary-sig-name">domain</a>(<span class="summary-sig-arg">site_name</span>)</span><br />
      Returns the domain name of a site_name.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.input.egee_map_input-pysrc.html#domain">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.input.egee_map_input-module.html#filter_sites" class="summary-sig-name">filter_sites</a>(<span class="summary-sig-arg">ce_raw</span>,
        <span class="summary-sig-arg">egee_map</span>)</span><br />
      Filters a raw map of grid CEs into an EGEEMap object with sites and 
      clusters.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.input.egee_map_input-pysrc.html#filter_sites">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.input.egee_map_input-module.html#write_map_delta" class="summary-sig-name">write_map_delta</a>(<span class="summary-sig-arg">mw</span>,
        <span class="summary-sig-arg">egee_map_to</span>,
        <span class="summary-sig-arg">egee_map_from</span>=<span class="summary-sig-default">EGEEMap()</span>)</span><br />
      Writes a timestamp followed by changes to the grid observed in 
      egee_map_to relative to egee_map_from.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.input.egee_map_input-pysrc.html#write_map_delta">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'simvoc.input'"><code class="variable-quote">'</code><code class="variable-string">simvoc.input</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<p class="indent-wrapped-lines"><b>Imports:</b>
  <a href="simvoc.input.datafilter-module.html#timestamp_to_gmtime" title="simvoc.input.datafilter.timestamp_to_gmtime">timestamp_to_gmtime</a>,
  <a href="simvoc.input.map_format_writer.MapWriter-class.html" title="simvoc.input.map_format_writer.MapWriter">MapWriter</a>,
  <a href="simvoc.input.mod_ldif.LDIFParser-class.html" title="simvoc.input.mod_ldif.LDIFParser">LDIFParser</a>,
  <span title="time">time</span>
</p><br />
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="domain"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">domain</span>(<span class="sig-arg">site_name</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.input.egee_map_input-pysrc.html#domain">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns the domain name of a site_name. Since all sites in the data 
  set are FQDNs, the domain name is simply the component of the site name 
  starting with (and including) the first dot.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>site_name</code></strong> (str) - Site name to parse</li>
    </ul></dd>
    <dt>Returns: str</dt>
        <dd>the domain name, with the leading dot</dd>
  </dl>
</td></tr></table>
</div>
<a name="filter_sites"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">filter_sites</span>(<span class="sig-arg">ce_raw</span>,
        <span class="sig-arg">egee_map</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.input.egee_map_input-pysrc.html#filter_sites">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Filters a raw map of grid CEs into an EGEEMap object with sites and 
  clusters. Every site is associated with at least one cluster. Whenever 
  two or more CEs on the same domain have identical CPU counts, an 
  identical number of sites will be created, sharing a single cluster. 
  Whenever more than one cluster is found on the same grid, all clusters 
  will be merged into the cluster with the largest CPU count.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>ce_raw</code></strong> - Raw CE map, as may be found in a SiteParser object's ce_map field
          after calling the parse() method</li>
        <li><strong class="pname"><code>egee_map</code></strong> - Output EGEEMap object to be populated</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="write_map_delta"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">write_map_delta</span>(<span class="sig-arg">mw</span>,
        <span class="sig-arg">egee_map_to</span>,
        <span class="sig-arg">egee_map_from</span>=<span class="sig-default">EGEEMap()</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.input.egee_map_input-pysrc.html#write_map_delta">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Writes a timestamp followed by changes to the grid observed in 
  egee_map_to relative to egee_map_from. An initial grid map may be written
  by invoking this method without egee_map_from.</p>
  <p>CAUTION: egee_map_from will be DESTROYED in the process of performing 
  the comparison</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>mw</code></strong> - MapWriter instance used for output</li>
        <li><strong class="pname"><code>egee_map_to</code></strong> - Later grid map: will not be changed</li>
        <li><strong class="pname"><code>egee_map_from</code></strong> - Earlier grid map: WILL BE DESTROYED</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="simvoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SimVOC</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0 on Fri Oct 23 11:04:28 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
